<?php
/**
 * 常量定义
 *
 * 所有的常量都在这里定义
 * @author: yanxs <541139655@qq.com>
 * @version: 1.0
 * @date: 2019/7/30
 */

//===========公共常量定义 start =====================//

const PUBLIC_YES              =   1;  // 是
const PUBLIC_NO               =   0;  // 否

const PUBLIC_DISABLE          =   0;  //禁用
const PUBLIC_ENABLE           =   1;  //启用
const PUBLIC_LOCK             =   3;  //锁定
const ZERO                    =   0;  //公共0
const ONE                     =   1;  //公共1
const PUBLIC_CHECK_CREATE     =   1;  //审核状态-创建
const PUBLIC_CHECK_DO         =   2;  //审核状态-审核中
const PUBLIC_CHECK_FINISH     =   3;  //审核状态-审核完成
const PUBLIC_CHECK_UNDO       =  -1;  //审核状态-反审核

const OPERATE_TYPE_USER       =   1;  //前台客户操作
const OPERATE_TYPE_ADMIN      =   2;  //后台管理员操作

const AREA_LEVEL_PROVINCE     =   1;  //省份等级
const AREA_LEVEL_CITY         =   2;  //城市等级
const AREA_LEVEL_DISTRICT     =   3;  //区/县等级

//===================== 公共常量定义 end ============//

//===========订单相关常量 start =====================//

//确认状态
const ORDER_UNCONFIRMED     =   0;  //未确认
const ORDER_CONFIRMED       =   1;  //已确认
const ORDER_CANCELED        =   2;  //已取消
const ORDER_INVALID         =   3;  //无效

//支付状态
const ORDER_UNPAY           =   0;  //未付款
const ORDER_PAYING          =   2;  //付款中
const ORDER_PAYED           =   1;  //已付款

//生产状态
const ORDER_NO_PRODUCE      =   0;  //未生产
const ORDER_PRODUCING       =   2;  //生产中
const ORDER_PRODUCED        =   1;  //生产完成
//综合状态
const ORDER_STATUS_WAIT_CONFIRM    =    1;   //待确认
const ORDER_STATUS_WAIT_PAY        =    2;   //待付款  已确认
const ORDER_STATUS_WAIT_PRODUCE    =    3;   //待生产  已付款
const ORDER_STATUS_WAIT_DELIVERY   =    4;   //待发货  已生产
const ORDER_STATUS_WAIT_RECEIVE    =    5;   //待收货  已发货
const ORDER_STATUS_CANCEL          =    6;   //交易取消
const ORDER_STATUS_AFTERSALE       =    7;    //售后
const ORDER_STATUS_FINISH          =   10;   // 交易完成  已收货

//评价状态,评价状态不影响订单主状态。评价在交易完成后
const ORDER_UNEVALUATE             =    0;   //待评价
const ORDER_EVALUATED              =    1;   //已评价

//订单日志相关
const ORDER_LOG_CREATE             =    1; //创建
const ORDER_LOG_PAY                =    2; //支付
const ORDER_LOG_EDIT               =    3; //修改

//集货状态
const NOT_BE_STOCKED                    = 0;
const BE_STOCKED                        = 1;

//退款单状态
const REFUND_STATUS_APPLY       = 0; //退款申请
const REFUND_STATUS_SUCCESS     = 1; //退款成功
const REFUND_STATUS_FAIL        = 2; //退款失败

//供货商订单状态
const SP_ORDER_STATUS_PRODUCE   = 1; //待生产
const SP_ORDER_STATUS_PRODUCING = 2; //生产中
const SP_ORDER_STATUS_PRINT     = 3; //已打码
const SP_ORDER_STATUS_DELIVERY  = 4; //已送货
const SP_ORDER_STATUS_SEND      = 5; //已发货

//同步队列的商品类型
const SYNC_QUEUE_DIY        = 1; //印品
const SYNC_QUEUE_ENTITY     = 2; //实物
const SYNC_QUEUE_MIX        = 3; //混合


//===========订单相关常量 end =====================//

//===========商品相关常量 start =====================//

//商品媒体相关
const GOODS_MEDIA_PHOTOS           =     1;//图片
const GOODS_MEDIA_VIDEO            =     2;//视频

//商品上架状态
const PRODUCT_OFF    	=   0; //下架
const PRODUCT_ON    	=   1; //上架


//===========分类管理相关常量 start =====================//

//分类状态
const CATEGORY_ENABLED             =    1; //启用
const CATEGORY_DISABLED            =    0; //禁用
//类目等级
const CATEGORY_NO_ONE              =    1; //第一级
const CATEGORY_NO_TWO              =    2; //第二级
const CATEGORY_NO_THREE            =    3; //第三级

//个性印刷所属id
const PERSONAL_PRINTING_ID         =    49;
const COMMERCIAL_PRINTING_ID         =    92;
//===========分类管理相关常量 end =====================//

//===========支付相关常量 start =====================//
const PAYMENT_FLAG_BALANCE        =      'balance'; //余额
const PAYMENT_FLAG_ALI            =      'alipay' ; //支付宝
const PAYMENT_FLAG_WX             =       'wxpay' ; //微信支付
const PAYMENT_FLAG_CMB_COM        =       'cmbjh'; //招行聚合支付
//===========支付相关常量 end =====================//

//===========财务/账务相关常量 start =====================//
const FINANCE_INCOME              =        1;  //收入
const FINANCE_EXPEND              =        2;  //支出

//资金变动类型
const FINANCE_CHANGE_TYPE_TRADE       =        1;  //交易
const FINANCE_CHANGE_TYPE_RECHARGE    =        2;  //充值
const FINANCE_CHANGE_TYPE_REFUND      =        3;  //退款
const FINANCE_CHANGE_TYPE_SERVICES    =        4;  //手续费
const FINANCE_CHANGE_TYPE_GIVE        =        5; //赠送
const FINANCE_CHANGE_TYPE_CASH        =        6; //提现
const FINANCE_CHANGE_TYPE_CHECK       =        7; //冲正
const FINANCE_CHANGE_TYPE_FROZEN      =        8; //冻结
//===========财务/账务相关常量 start =====================//

//登录相关
const LOGIN_TYPE_SMS            = "sms"; //短信验证码
const LOGIN_TYPE_PASSWORD       = "pwd"; // 密码
const LOGIN_TYPE_SCAN           = "scan";//扫码


